<template>
  <div class="about_container">
    <div class="main-content">
      <mavon-editor v-model="content"
        :subfield="false"
        :boxShadow="false"
        defaultOpen="preview"
        :toolbarsFlag="false"
        previewBackground="#ffffff"
      />
      <div class="right">
        <W-Introduce></W-Introduce>
      </div>
    </div>
  </div>
</template>

<script>
import { mavonEditor } from 'mavon-editor'
import 'mavon-editor/dist/css/index.css'
import IntroduceRight from '../components/section/IntroduceRight'
export default {
  data () {
    return {
      content: ''
    }
  },
  metaInfo: {
    title: '风在哪博客详情页', // set a title
    meta: [{
      name: 'keywords',
      content: '风在哪,Java,Redis,IT,网络,操作系统,leetcode,个人网站,博客网站'
    },
    {
      name: 'description',
      content: '风在哪个人博客网站,热爱编程的学习者,Java后端技术分享,算法知识分享'
    }]
  },
  components: {
    'W-Introduce': IntroduceRight,
    mavonEditor
  },
  methods: {
    getContent () {
      this.$axios.get('/view/authorInfo/getContent', {
        params: {
          id: 2
        }
      }).then(response => {
        // console.log(response.data)
        this.$set(this, 'content', response.data.data)
      }).catch(error => {
        console.log(error)
      })
    }
  },
  mounted () {
    this.getContent()
  }
}
</script>

<style lang="less" scoped>
.about_container{
  margin-top: 2%;
}
.main-content{
  display: flex;
  margin-left: 10%;
}
.right{
  margin-left: 3%;
}
</style>
